package com.game.worm.mobile.tools;

import android.app.Dialog;
import android.content.Context;
import android.support.annotation.NonNull;
import android.view.View;
import android.view.ViewGroup;

import com.game.worm.mobile.R;

/**
 * Created by d_xxiang on 2018/4/21.
 */

public class CustomDialog extends Dialog {

    public CustomDialog(@NonNull Context context) {
        super(context);
    }

    public CustomDialog(@NonNull Context context, int themeResId) {
        super(context, themeResId);
    }

    public static class Builder{
        private String message;
        private CustomDialog dialog;
        public Builder(Context context){
            dialog = new CustomDialog(context, R.style.Dialog);
        }

        public CustomDialog builder(View beShow){
            dialog.addContentView(beShow, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
            dialog.setContentView(beShow.findViewById(R.id.dialog));
            return dialog;
        }
    }



}
